﻿using System;
using System.Collections.Generic;
using System.Web;

/// <summary>
/// Summary description for Tour
/// </summary>
public class Tour:ServiceObject
{
	/// <summary>
    /// Fields of Tour
    /// </summary>
    #region Fields
    TourCategory type;   
    Location location;
    string region;    
    Int16 during;   
    decimal price;    
    decimal discount;    
    int rank;
    bool isRecommended;

    
    #endregion

    /// <summary>
    /// Properties of Tour
    /// </summary>
    #region Properties
 
    public Location Location
    {
        get { return location; }
        set { location = value; }
    }
    public string Region
    {
        get { return region; }
        set { region = value; }
    }
    public Int16 During
    {
        get { return during; }
        set { during = value; }
    }
    public decimal Price
    {
        get { return price; }
        set { price = value; }
    }
    public decimal Discount
    {
        get { return discount; }
        set { discount = value; }
    }
    public int Rank
    {
        get { return rank; }
        set { rank = value; }
    }
    public bool IsRecommended
    {
        get { return isRecommended; }
        set { isRecommended = value; }
    }
    #endregion

    /// <summary>
    /// Constructures Tour
    /// </summary>
    #region Constructures
    public Tour()
    {
        type = new TourCategory();
        location = new Location();
        region = "";
        during = 0;
        price = 0;
        discount = 0;
        rank = 0;
        isRecommended = true;
    }

    public Tour(TourCategory type, Location location, string region, Int16 during, decimal price, decimal discount, int rank,bool isRecommended)
	{

        this.type = type;
        this.location = location;
        this.region = region;
        this.during = during;
        this.price = price;
        this.discount = discount;
        this.rank = rank;
        this.isRecommended = isRecommended;

    }
    #endregion

    #region methods
    public static void GetPublicTours(ref IList<Tour> list)
    {
        foreach (Tour t in list)
        {
            if (t.State == false) list.Remove(t);
        }
    }
    #endregion
}